h5页面分享,安卓机点链接进入不是到分享的页面,而是总是到首页,ios正常

您所在的位置:网站首页 vue span-method h5页面分享,安卓机点链接进入不是到分享的页面,而是总是到首页,ios正常

h5页面分享,安卓机点链接进入不是到分享的页面,而是总是到首页,ios正常

#h5页面分享,安卓机点链接进入不是到分享的页面,而是总是到首页,ios正常 | 来源: 网络整理| 查看: 265

这个页面分享出去在ios可以正常进入此页面,安卓机以前可以进入,最近一段时间安卓机不能进入此页面,而是进入首页,

页面代码如下:

拼团活动结束时间: {{groupdata.goodsName}} {{User.groupUser}}人团 {{groupdata.goodsAbstract}} 团购价:¥{{groupdata.salePrice}} ¥{{groupdata.originalPrice}} 服务保障 上门服务 科学打扫 专职保洁师 规格 已选:{{groupdata.style[switchindex].title}} 团长 {{group.groupName}} 拼团ID {{User.id}} 拼团成员 ... {{groupUser.length?groupUser.length:'0'}}人已团 商品详情 已经参团 该团已拼满 拼团购买 ¥{{groupdata.salePrice}} {{groupdata.goodsName}} ¥{{groupdata.style[switchindex].money}} 规格 {{item.title}} 立即拼团 立即拼团 import uniPopup from '@/components/uni-popup/uni-popup.vue' import bbsCountdown from "@/components/bbs-countdown/bbs-countdown.vue" import api from '../../../static/config/api.js' import util from '../../../static/utils/util.js' import rich from "../../../static/rich-text-parse.js" export default { components: {         uniPopup, bbsCountdown     }, data() { return { switchindex:'0', groupUuid:'', groupdata:[] ,//拼团商品数据 groupUser:'' ,//拼团成员 groupUserImg:'',//拼团成员头像 group:'',//团长信息 endTime:'' ,//拼团结束时间 User:'', notfull:false, isjoin:'' ,//判断是否加入团 goodsDetails:'' ,//富文本 timestamp:'' } }, onLoad(info) { this.groupUuid = info.groupUuid this.endTime = info.endtime this.timestamp = new Date(info.endtime.replace(/-/g,'/')).getTime()-Date.now() console.log(this.timestamp); var isjoin = info.isjoin if(isjoin){ this.isjoin = true }else{ this.isjoin =false } this.getGroupInformation() }, onShareAppMessage(res) { var groupUuid = this.groupUuid var endTime = this.endTime var title = this.groupdata.goodsName // console.log(groupUuid,endTime); return {   title: title,   path: '/pages/index/Productdetails/groupdetails02?groupUuid='+groupUuid+'&endtime='+endTime } }, methods: { // 现在的时间戳--必须传入 now() { return Date.now() }, // 倒计时进行中 progress(time) { // console.log(time); }, //查询指定的拼团信息 getGroupInformation(){ var that = this util.request(api.GetGroupInformation,{groupUuid:that.groupUuid},'GET').then(function(res){ console.log('拼团信息',res) if(res.code == 200){ //拼团商品数据 that.groupdata = res.data.goods console.log("aa",that.groupdata) //拼团成员 that.groupUser = res.data.groupUser //根据拼团成员判断显示几个头像 if(that.groupUser&&that.groupUser.length>=5){ that.groupUserImg = that.groupUser.slice(0,5) }else{ that.groupUserImg = that.groupUser } //团长信息 that.group = res.data.group //拼团商品的id和拼团人数信息 that.User = res.data.groupInitiate //判断人数是否已满 if(that.groupUser&&that.User.groupUser==that.groupUser.length){ that.notfull = true } that.goodsDetails = rich.imgParse100Width(res.data.goods.goodsDetails) // console.log(that.groupdata) //分享 // #ifdef H5 that. fenxiang() // #endif } }) }, // 打开弹出层 open(){ if(!this.isjoin&&!this.notfull){ this.$refs.popup.open() } }, // 点击弹出层选择规格 switchtype(idx){ this.switchindex = idx }, //当拼团人数满后点击‘该拼团已满’ full(){ uni.showToast({     title: '该团已拼满,可参与其他团购', icon:'none',     duration: 2000 }); }, //不可购买 nobuy(){ uni.showToast({ title:'此服务限购一次~~', icon:'none', duration:2000 }) }, //分享 fenxiang() { let that = this let imgUrl = 'https://zixun.xcxlichao.cn/cbbtt/zyl/houseKeeping/logo03.jpg' let url = window.location.href; util.request(api.getShare, { url: url }, 'GET').then((res) => { if (res.code == 200) { wx.config({ debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 appId: res.data.appId, // 必填,公众号的唯一标识 timestamp: res.data.timestamp, // 必填,生成签名的时间戳 nonceStr: res.data.nonceStr, // 必填,生成签名的随机串 signature: res.data.signature, // 必填,签名,见附录1 jsApiList: [ "updateAppMessageShareData" ,"onMenuShareQQ" ,"updateTimelineShareData" ,"onMenuShareTimeline" ,"onMenuShareAppMessage"], // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 success: function() { // window.location("http://www.kangkanginhome.com/weixin/IndexHtml/tuan_list")  }, }) wx.ready(function() { //需在用户可能点击分享按钮前就先调用 var obj={ title:that.groupdata.goodsName, // 分享标题 desc: that.groupdata.goodsAbstract, // 分享描述 link: url, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 imgUrl: imgUrl, // 分享图标 fail: function (res) { }, success: function () { }, } //朋友圈 wx.onMenuShareTimeline && wx.onMenuShareTimeline(obj) //发送给好友 wx.onMenuShareAppMessage && wx.onMenuShareAppMessage(obj) // 2.1 监听“分享给朋友”,按钮点击、自定义分享内容及分享结果接口 wx.updateAppMessageShareData && wx.updateAppMessageShareData(obj); // 2.2 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口 wx.onMenuShareTimeline(obj); // 2.3 监听“分享到QQ”按钮点击、自定义分享内容及分享结果接口 wx.updateAppMessageShareData && wx.updateAppMessageShareData(obj); }); } }) } } } @import url("../../../static/css/Productdetails.css"); https://m.clmeijia.com/h5/#/pages/index/Productdetails/groupdetails02?groupUuid=87b86003929a4bd5a463c222e32465ca&endtime=2021-12-31%2023%3A59%3A59


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3